<template>
	<div class="layout flex align-center">
		<div class="search rounded-max-lg flex-1 pl-2">
			<u-icon class="mr-1" name="search"></u-icon>
			<u-input v-model.trim="value" type="text" placeholder="搜索商家名称" :border="false" />
		</div>
		<div slot="right" open-type="contact"
			class="navbar-right flex align-center searchbtn text-white bge87722 px-3 rounded-circle" @click="handleSearch"
			style="border-style:none;">
			搜索
		</div>
	</div>
</template>

<script>
	export default {
		title: "搜索栏",
		props: ["res", "storeId"],
		data() {
			return {
				value: ''
			}
		},
		methods: {
			handleSearch() {
				this.$emit('confirm', this.value)
			},
		},
	};
</script>
<style lang="scss" scoped>
	@import "./tpl.scss";

	.search {
		height: 64rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #ededed;
	}

	.layout {
		background: #fff;
		padding: 0 16rpx;
		position: relative;
	}

	.navbar-right {
		position: absolute;
		top: 0;
		// right: 0;
	}

	.searchbtn {
		height: 30px;
		right: 20rpx;
		top: 2rpx;
	}
</style>